#!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time : 2021/10/20 8:59
# @Group: 国金量化开发组
# @File : schemas.py
# All Rights Reserved by 国金证券.

"""
文件说明
"""
from datetime import datetime
from datetime import date as date_
from pydantic import BaseModel


class CreateCity(BaseModel):
    province: str
    country: str
    country_code: str
    country_population: int


class ReadCity(CreateCity):
    id: int
    created_at: datetime
    updated_at: datetime

    class Config:
        orm_mode = True


class CreateData(BaseModel):
    date: date_
    confirmed: int = 0
    deaths: int = 0
    recovered: int = 0


class ReadData(CreateData):
    id: int
    city_id: int
    created_at: datetime
    updated_at: datetime

    class Config:
        orm_mode = True
